#include<stdlib.h>
#include<string.h>
#include <stdio.h>
#define erro1 "Erro na string"
#define seps ", +*."

char* pega_palavra(char *str){
  
  char* aux;
  char* strouts;
  int tam=0;
  
  aux = strpbrk(str, seps);
  
  if(aux!= str){
    tam = aux-str;
    
  }
  
  else{
    tam = strspn(str, seps);
    str+= tam;
    aux = strpbrk(str, seps);
    tam= aux-str;
    
  }
  
  strncpy(strouts, str, tam);
    
  
  return strouts;
  
}

int main(int argc, char** argv){
  
  char* string;
  char* stprinted;
  string = argv[1];
  int i=0;
  while(string!=NULL){
    printf("Chamada %d \n", i);
    stprinted = pega_palavra(string);
    printf("Palavra: %s\n", stprinted);
    i++;
  }
  
  //system("pause");
}
